package com.miwzn.base;

import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

/**
 * @Auther: wzn
 * @Date: 2018/5/30 15:45
 * @Description: mapper 基类
 */
public interface Mapper<T, D extends BaseEntity, Q extends QueryEntity> extends MySqlMapper<T>, tk.mybatis.mapper.common.Mapper<T> {
    /**
     * 采用UUID主键需要重写insert
     *
     * @param entity
     *
     * @return
     */
    @Override
    int insert(T entity);

    /**
     * 采用UUID主键需要重写insert
     *
     * @param entity
     *
     * @return
     */
    @Override
    int insertSelective(T entity);

    /**
     * 查询
     *
     * @param entity
     *
     * @return List<T>
     */
    public List<T> selectList(Q entity);

    /**
     * 查询
     *
     * @param entity
     *
     * @return List<T>
     */
    public List<D> selectDList(Q entity);
}
